package com.yyfax.pay.third.model.to.baofu;

import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;
import com.yyfax.framework.model.Params;
import com.yyfax.framework.yyfax.enums.RspCodeEnum;
import com.yyfax.pay.common.exception.YYPayException;

/**
 * 宝付批量代扣
 * 
 * @author maojian
 * @date 2017-04-12 10:23:38
 * @since v1.0.0
 */
@SuppressWarnings({ "serial" })
public class PayinOrderBaoFuParams extends Params {
	
	private String dataType;
	
	/**
	 * @Fields pfxPath : 商户私钥路径 
	 */
	private String pfxPath;
	
	/**
	 * @Fields pfxPwd : 商户私钥密码
	 */
	private String pfxPwd;
	
	/**
	 * @Fields cerPath : 宝付公钥路径
	 */
	private String cerPath;

	/**
	 * @Fields version : 版本号 
	 */
	private String version;
	
	/**
	 * @Fields terminal_id : 终端号
	 */
	@JSONField(name="terminal_id")  
	private String terminalId;

	/**
	 * @Fields txn_type : 交易类型 
	 */
	@JSONField(name="txn_type")  
	private String txnType;
	
	/**
	 * @Fields txn_sub_type : 交易子类 
	 */
	@JSONField(name="txn_sub_type")  
	private String txnSubType;
	
	/**
	 * @Fields member_id : 商户号
	 */
	@JSONField(name="member_id")  
	private String memberId;
	
	/**
	 * @Fields url : 代扣请求url
	 */
	private String url;
	
	/**
	 * @Fields trans_batch_id : 商户流水号
	 */
	@JSONField(name="trans_id")  
	private String transId;
	
	/**
	 * @Fields trans_date : 订单日期 14 位定长。格式：年年年年月月日日时时分分秒秒
	 */
	@JSONField(name="trans_date")  
	private String tradeDate;
	
	/**
	 * 默认为：2 1:不进行信息严格验证2:对四要素（身份证号、持卡人姓名、银行卡绑定手机、卡号）进行严格校验
	 */
	private String payCm;
	
	@JSONField(name="pay_code") 
	private String payCode;
	/**
	 * @Fields acc_no : 卡号 整型数字
	 */
	@JSONField(name="acc_no")  
	private String accNo;
	/**
	 * @Fields id_holder : 持卡人姓名
	 */
	@JSONField(name="id_holder")  
	private String idHolder;
	/**
	 * @Fields id_card_type : 身份证类型 固定值：0101认为身份证号
	 */
	@JSONField(name="id_card_type")  
	private String idCardType;
	/**
	 * @Fields id_card : 身份证号
	 */
	@JSONField(name="id_card")  
	private String idCard;
	/**
	 * @Fields mobile : 银行卡绑定手机号
	 */
	private String mobile;
	/**
	 * @Fields txn_amt : 交易金额
	 */
	@JSONField(name="txn_amt")  
	private String txnAmt;
	
	/**
	 * @Fields trans_serial_no : 商户批次号
	 */
	@JSONField(name="transSerial_no")  
	private String transSerialNo;
	
	/**
	 * 其他：不填写和默认0000,表示为储蓄卡支付。
	 */
	private String bizType;
	
	public String getTradeDate() {
		return tradeDate;
	}

	public void setTradeDate(String tradeDate) {
		this.tradeDate = tradeDate;
	}

	public String getPayCode() {
		return payCode;
	}

	public void setPayCode(String payCode) {
		this.payCode = payCode;
	}

	public String getAccNo() {
		return accNo;
	}

	public void setAccNo(String accNo) {
		this.accNo = accNo;
	}

	public String getIdHolder() {
		return idHolder;
	}

	public void setIdHolder(String idHolder) {
		this.idHolder = idHolder;
	}

	public String getIdCardType() {
		return idCardType;
	}

	public void setIdCardType(String idCardType) {
		this.idCardType = idCardType;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getTxnAmt() {
		return txnAmt;
	}

	public void setTxnAmt(String txnAmt) {
		this.txnAmt = txnAmt;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}


	public String getTerminalId() {
		return terminalId;
	}

	public void setTerminalId(String terminalId) {
		this.terminalId = terminalId;
	}

	public String getTxnType() {
		return txnType;
	}

	public void setTxnType(String txnType) {
		this.txnType = txnType;
	}

	public String getTxnSubType() {
		return txnSubType;
	}

	public void setTxnSubType(String txnSubType) {
		this.txnSubType = txnSubType;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTransId() {
		return transId;
	}

	public void setTransId(String transId) {
		this.transId = transId;
	}

	public String getTransSerialNo() {
		return transSerialNo;
	}

	public void setTransSerialNo(String transSerialNo) {
		this.transSerialNo = transSerialNo;
	}

	public String getPfxPath() {
		return pfxPath;
	}

	public void setPfxPath(String pfxPath) {
		this.pfxPath = pfxPath;
	}

	public String getPfxPwd() {
		return pfxPwd;
	}

	public void setPfxPwd(String pfxPwd) {
		this.pfxPwd = pfxPwd;
	}

	public String getCerPath() {
		return cerPath;
	}

	public void setCerPath(String cerPath) {
		this.cerPath = cerPath;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public String getBizType() {
		return bizType;
	}

	public void setBizType(String bizType) {
		this.bizType = bizType;
	}
	
	public String getPayCm() {
		return payCm;
	}

	public void setPayCm(String payCm) {
		this.payCm = payCm;
	}

	@Override
	public boolean validate() throws Exception {
		if (this.terminalId == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantNo参数不能为空");
		}
		if (this.memberId == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "payReqData参数不能为空");
		}
		if (this.txnType == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantId参数不能为空");
		}
		if (this.txnSubType == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantSecurit参数不能为空");
		}
		if (this.transId == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantSecurit参数不能为空");
		}
		if (this.transSerialNo == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantSecurit参数不能为空");
		}
		return false;
	}


	
	
}
